@media (max-width: 1024px) {
  header { height: auto; }
  header > .container { width: calc(100% - 32px); max-width: 960px; }
  header .header_top { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "brand cart" "contacts contacts" "city city"; align-items: center; gap: 4px 12px; height: auto; overflow: visible; padding: 10px 0 9px; }
  header .header_logo { grid-area: brand; width: min(100%,220px); padding: 0; margin: 0; z-index: auto; }
  header .header_logo img { display: block; width: 100%; height: auto; }
  header .header_desc, header .header_cart > br, header .header_login br { display: none; }
  header .header_cart { display: contents; }
  header .header_cart > .bx-basket { grid-area: cart; justify-self: end; position: relative; }
  header .bx-basket-block { position: relative; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; background: #a62124; color: white; border-radius: 12px; min-height: 44px; box-sizing: border-box; padding: 8px 12px; }
  header .bx-basket-block::before { content: "Корзина"; font: 600 14px/1.2 Arial,sans-serif; }
  header .header_cart_img, header .header_cart_text p, header .header_cart_text h3:before { display: none; }
  header .header_cart_text, header .header_cart_zakaz { margin: 0; padding: 0; float: none; }
  header .header_cart_text h3 { color: white; margin: 0; font: 600 14px/1.2 Arial,sans-serif; }
  header .header_cart_text h3::after { content: " ₽"; }
  header .header_cart_zakaz .cart_btn { position: absolute; inset: 0; width: auto; height: auto; border: 0; border-radius: 12px; background: transparent; color: transparent; font-size: 0; line-height: normal; }
  header .header_login { grid-area: contacts; display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; margin: 0; padding: 0; width: auto; overflow: visible; }
  header .header_login .login_btn { width: auto; height: auto; margin: 0; padding: 7px 0; border: 0; line-height: 1.3; font-size: 14px; }
  header .login_btn:before, header .header_login a.header_tel:before { display: none; }
  header .header_login .call_phone_1 { order: -1; }
  header .header_login a.header_tel { display: inline-block; margin: 0; padding: 7px 0; font-size: 17px; line-height: 1.3; color: #222; }
  header .header_cart .tfl__link-container { grid-area: city; position: static; width: auto; margin: 0; padding: 0; text-align: left; font-size: 13px; }
  html.sushki-header-in-view #cart2_block { visibility: hidden; }
}
@media (min-width: 650px) and (max-width: 1024px) {
  header .header_top { grid-template-columns: minmax(180px,220px) minmax(180px,1fr) auto; grid-template-areas: "brand contacts cart" "brand city cart"; }
  header .header_login { align-self: end; justify-content: flex-start; }
  header .header_cart .tfl__link-container { align-self: start; }
}

@media (max-width: 1024px) {
  header .header_top { grid-template-areas: "brand cart" "brand contacts" "tagline city"; gap: 2px 12px; padding: 6px 0; }
  header .header_desc { grid-area: tagline; display: block; position: static; float: none; justify-self: start; width: min(100%,220px); height: auto; padding: 0; margin: 0; text-align: center; }
  header .header_desc h3 { margin: 0; font: 400 18px/1.15 'Lobster', cursive; color: #008fd9; }
}
@media (max-width: 649px) {
  header .header_top { grid-template-columns: minmax(0,1fr) max-content; }
  header .header_login { width: 0; min-width: 100%; display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
  header .header_login a.header_tel { font-size: 15px; padding: 4px 0; white-space: nowrap; }
  header .header_login .login_btn { font-size: 13px; padding: 4px 0; white-space: nowrap; }
  header .header_cart > .bx-basket { align-self: end; }
  header .header_cart .tfl__link-container { width: 0; min-width: 100%; text-align: right; line-height: 1.3; }
  header .header_cart .tfl__link-label { display: none; }
}
@media (min-width: 650px) and (max-width: 1024px) {
  header .header_top { grid-template-areas: "brand contacts cart" "tagline city cart"; }
}

@media (min-width: 650px) and (max-width: 1024px) {
  header .header_top { row-gap: 0; padding-block: 0; }
  header .header_desc { margin-top: -5px; }
  header .header_login { align-self: center; }
}

@media (max-width: 1024px) {
  header .header_desc { container-type: inline-size; }
  header .header_desc h3 { font-size: 24px; font-size: 12cqw; line-height: 1.1; white-space: nowrap; }
  header .bx-basket-block { isolation: isolate; background: transparent; }
  header .bx-basket-block::after { content: ''; position: absolute; inset: 7.5%; z-index: -1; border-radius: 10px; background: #a62124; pointer-events: none; }
}

@media (orientation: landscape) and (max-width: 1024px) {
  header .header_top { grid-template-columns: minmax(0,220px) minmax(0,1fr) max-content max-content; grid-template-areas: "brand tagline contacts cart" "brand tagline city cart"; gap: 0 8px; padding-block: 0; }
  header .header_desc { width: min(100%,220px); margin: 0; text-align: left; }
  header .header_login { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; align-self: end; gap: 0; width: auto; min-width: 0; }
  header .header_login a.header_tel, header .header_login .login_btn { padding-block: 3px; }
  header .header_cart .tfl__link-container { align-self: start; padding-top: 2px; }
  header .header_cart > .bx-basket { align-self: center; }
}
@media (orientation: landscape) and (max-width: 679px) {
  header .header_top { grid-template-columns: minmax(0,220px) minmax(0,1fr) max-content; grid-template-areas: "brand tagline cart" "brand tagline contacts" "brand tagline city"; }
  header .header_login { align-items: flex-end; }
  header .header_cart .tfl__link-container { text-align: right; }
}
