:root {
  color-scheme: light;
  --bg: #f7fbff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-solid: #ffffff;
  --ink: #152631;
  --muted: #71808b;
  --line: #dcecf5;
  --green: #16aeea;
  --green-dark: #087fb5;
  --red: #ef4f43;
  --yellow: #f2c15b;
  --blue: #119fdd;
  --brown: #7a4312;
  --soft-blue: #eaf8ff;
  --soft-warm: #fff8ea;
  --shadow: 0 16px 42px rgba(17, 118, 174, 0.1);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 50% -120px, rgba(22, 174, 234, 0.18), transparent 330px),
    linear-gradient(180deg, #ffffff 0, #f7fbff 280px, #fbfdff 100%),
    var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 980px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px calc(96px + env(safe-area-inset-bottom));
}

.topbar,
.profile-strip,
.section-head,
.sort-row,
.legal-footer,
.bottom-nav,
.filters,
.chains-list {
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  padding: 22px 0 4px;
  font-size: 13px;
}

.legal-footer a {
  color: var(--muted);
  text-decoration: none;
}

.legal-footer a:hover {
  color: var(--green-dark);
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 22px rgba(17, 118, 174, 0.06);
}

.language-switch button {
  min-width: 38px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.language-switch button.active {
  background: var(--green);
  color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 2px solid #ffffff;
  border-radius: 18px;
  background: var(--panel-solid);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--brown);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.05;
}

h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.title-back {
  display: inline-grid;
  width: 30px;
  height: 30px;
  margin-right: 8px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--green-dark);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background: var(--green);
  color: white;
  font-size: 25px;
  box-shadow: var(--shadow);
}

.profile-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(17, 118, 174, 0.06);
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--soft-blue);
  color: var(--green-dark);
  font-weight: 900;
}

.profile-name {
  margin-bottom: 2px;
  font-weight: 800;
}

.profile-meta {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.count-pill {
  min-width: 42px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--green-dark);
  color: white;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filters input,
.filters select {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-solid);
  color: var(--ink);
  outline: none;
  padding: 0 10px;
}

.filters input:focus,
.filters select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 174, 234, 0.16);
}

.sort-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.sort-choice {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font: inherit;
  font-weight: 900;
}

.sort-choice::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.category-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 0 0 12px;
  margin-bottom: 4px;
}

.subcategory-carousel {
  margin-top: -4px;
}

.subcategory-carousel[hidden] {
  display: none;
}

.category-card {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: max-content;
  max-width: 220px;
  min-height: 38px;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  color: var(--ink);
  padding: 0 12px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(17, 118, 174, 0.07);
}

.category-card.active {
  border-color: var(--green);
  background: linear-gradient(180deg, #ffffff, var(--soft-blue));
  box-shadow: 0 0 0 3px rgba(22, 174, 234, 0.14);
}

.category-card h3 {
  margin: 0;
  font: inherit;
  line-height: inherit;
}

.category-card p {
  display: none;
}

.product-view-toggle {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 22px rgba(17, 118, 174, 0.06);
}

.product-view-toggle button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.product-view-toggle button.active {
  background: linear-gradient(180deg, #ffffff, var(--soft-blue));
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(22, 174, 234, 0.28);
}

.store-links {
  display: grid;
  gap: 5px;
}

.store-link {
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  color: var(--ink);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.store-link.active {
  border-color: var(--green);
  background: var(--soft-blue);
  color: var(--green-dark);
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.catalog-layout.compact {
  margin-top: 12px;
}

.facet-column {
  display: grid;
  grid-column: 1;
  gap: 22px;
  align-self: start;
}

.facet-panel {
  display: grid;
  gap: 0;
  align-self: start;
  position: relative;
  padding: 0 10px 18px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.catalog-layout > .product-grid {
  grid-column: 2;
  grid-row: 1;
}

.facet-group h3 {
  margin: 0 0 18px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
}

.facet-options {
  display: grid;
  gap: 14px;
}

.facet-subgroup {
  display: grid;
  gap: 12px;
  padding: 0 0 6px;
}

.facet-subgroup + .facet-subgroup {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.facet-subgroup h4 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.facet-options.expanded {
  max-height: 210px;
  overflow-y: auto;
  padding-right: 18px;
  scrollbar-color: #aeb2ba transparent;
  scrollbar-width: auto;
}

.facet-options.expanded::-webkit-scrollbar {
  width: 8px;
}

.facet-options.expanded::-webkit-scrollbar-track {
  background: transparent;
}

.facet-options.expanded::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #aeb2ba;
}

.facet-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
}

.facet-check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--green);
}

.facet-check span {
  overflow-wrap: anywhere;
}

.facet-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.facet-more {
  position: sticky;
  bottom: 0;
  z-index: 1;
  width: fit-content;
  border: 0;
  border-bottom: 1px dashed currentColor;
  background: linear-gradient(180deg, rgba(247, 251, 255, 0), var(--bg) 34%);
  color: #8a8f99;
  padding: 8px 0 0;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
}

.ad-slot {
  display: block;
  min-height: 96px;
  margin: 14px 0;
  overflow: hidden;
}

.ad-slot-top {
  margin-bottom: 18px;
}

.ad-slot-bottom {
  margin-top: 14px;
}

.ad-slot-feed {
  grid-column: 1 / -1;
  min-height: 120px;
}

.ad-slot .adsbygoogle {
  min-height: 96px;
}

.ad-slot-feed .adsbygoogle {
  min-height: 120px;
}

.ad-label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ad-slot strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.ad-slot span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chip {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  color: var(--ink);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.chip.active {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

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

.product-grid.compact {
  margin-top: 12px;
}

.product-grid.grouped-products {
  grid-template-columns: 1fr;
  gap: 10px;
}

.product-group-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  width: 90%;
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-solid);
  box-shadow: 0 12px 30px rgba(17, 118, 174, 0.08);
}

.product-group-media {
  display: grid;
  min-height: 132px;
  place-items: center;
  background: linear-gradient(135deg, #ffffff 0, var(--soft-blue) 54%, var(--soft-warm) 100%);
}

.product-group-media img {
  display: block;
  width: 100%;
  height: 118px;
  object-fit: contain;
  padding: 12px;
}

.product-group-body {
  min-width: 0;
  padding: 10px 12px 12px;
}

.product-group-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.product-group-head h3 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.24;
}

.product-group-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 22px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.product-group-offers {
  display: grid;
  gap: 7px;
}

.product-group-offer {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.product-group-offer img {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  object-fit: contain;
}

.product-group-source,
.product-group-price {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.product-group-source span {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-group-source small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-group-price {
  justify-items: end;
  text-align: right;
}

.product-group-price strong {
  color: #008267;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.product-group-price span {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
}

.product-group-price small {
  color: var(--muted);
  font-size: 11px;
  text-decoration: line-through;
  white-space: nowrap;
}

.product-card {
  overflow: hidden;
  width: 90%;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-solid);
  box-shadow: 0 12px 30px rgba(17, 118, 174, 0.08);
}

.media {
  position: relative;
  display: grid;
  min-height: 148px;
  place-items: center;
  background: linear-gradient(135deg, #ffffff 0, var(--soft-blue) 54%, var(--soft-warm) 100%);
}

.product-image {
  display: block;
  width: 100%;
  height: 154px;
  object-fit: contain;
  padding: 16px 18px 12px;
}

.chain-logo {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border: 2px solid white;
  border-radius: 50%;
  background: white;
  object-fit: contain;
  box-shadow: 0 8px 22px rgba(21, 38, 49, 0.14);
}

.product-body {
  position: relative;
  padding: 12px 14px;
  padding-bottom: 36px;
}

.product-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.product-title {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.24;
}

.discount-badge {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.actual-price {
  color: #008267;
  font-size: 21px;
  font-weight: 900;
}

.old-price {
  color: var(--muted);
  font-size: 13px;
  text-decoration: line-through;
}

.unit-price {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.28;
  white-space: nowrap;
}

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 0;
}

.facts div {
  min-width: 0;
}

.facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.facts dd {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.28;
}

.pack-line {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.dates {
  margin-top: 2px;
  color: #1c2c37;
}

.quantity-control {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: fit-content;
  min-width: 24px;
  min-height: 24px;
  border: 1px solid transparent;
  background: var(--panel-solid);
}

.quantity-control.is-active {
  padding: 0;
  background: var(--panel-solid);
  box-shadow: none;
}

.quantity-button {
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #73818a;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.quantity-decrease {
  background: transparent;
  color: #73818a;
}

.quantity-value {
  min-width: 20px;
  color: #73818a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.shopping-source-carousel {
  margin-top: -2px;
  margin-bottom: 12px;
}

.shopping-source-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.shopping-source-check {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  flex: 0 0 auto;
  border: 1.6px solid #7d8a92;
  border-radius: 4px;
  color: #008267;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  background: #ffffff;
}

.shopping-source-button.active .shopping-source-check {
  border-color: #008267;
  background: rgba(0, 130, 103, 0.08);
}

.shopping-share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: fit-content;
  margin: 0 0 12px;
  white-space: nowrap;
}

.telegram-share-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: contain;
}

.manual-shopping {
  display: grid;
  gap: 8px;
  width: 90%;
  margin: 0 0 14px;
  justify-self: center;
  padding: 0;
}

.manual-shopping-form {
  position: relative;
  display: block;
  width: 100%;
}

.manual-shopping-form input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 50px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.manual-shopping-form input:focus {
  border-color: rgba(0, 130, 103, 0.38);
  box-shadow: 0 0 0 3px rgba(0, 130, 103, 0.08);
}

.manual-shopping-form button {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #73818a;
  font-size: 24px;
  line-height: 1;
}

.manual-shopping-list {
  display: grid;
  gap: 6px;
}

.manual-shopping-item {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 11px;
  min-height: 38px;
  padding: 7px 10px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  touch-action: pan-y;
  transition: transform 220ms ease, opacity 220ms ease;
  will-change: transform;
}

.manual-shopping-item.is-dragging {
  transition: none;
}

.manual-shopping-item.is-removing {
  opacity: 0.88;
  transition: transform 260ms ease, opacity 260ms ease;
}

.manual-shopping-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.manual-shopping-item.is-checked span {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.manual-shopping-check {
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0;
  place-items: center;
  border: 1.5px solid #a9b6bd;
  border-radius: 5px;
  background: transparent;
  color: #008267;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.shopping-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shopping-title-row h2 {
  margin: 0;
}

.shopping-back {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #73818a;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.shopping-swipe-shell {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: transparent;
  --swipe-open: 0px;
}

.shopping-swipe-shell::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 112px;
  height: 100%;
  content: "";
  background: linear-gradient(90deg, rgba(242, 85, 79, 0), #f2554f 28%);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.shopping-swipe-shell.is-swiping::after,
.shopping-swipe-shell.is-removing::after {
  opacity: 1;
}

.shopping-delete-icon {
  position: absolute;
  top: 50%;
  right: calc(var(--swipe-open) / 2);
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #111820;
  opacity: 0;
  transform: translate(50%, -50%) scale(0.92);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.shopping-delete-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shopping-swipe-shell.is-swiping .shopping-delete-icon,
.shopping-swipe-shell.is-removing .shopping-delete-icon {
  opacity: 1;
  transform: translate(50%, -50%) scale(1);
}

.shopping-list-card {
  position: relative;
  z-index: 2;
  touch-action: pan-y;
  transition: transform 220ms ease, opacity 220ms ease;
  will-change: transform;
}

.shopping-list-card.is-dragging {
  transition: none;
}

.shopping-list-card.is-removing {
  opacity: 0.88;
  transition: transform 260ms ease, opacity 260ms ease;
}

.shopping-list-card .product-title {
  padding-right: 30px;
}

.shopping-list-card.is-bought .product-title {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.shopping-check {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0;
  place-items: center;
  border: 1.5px solid #a9b6bd;
  border-radius: 5px;
  background: transparent;
  color: #008267;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.shopping-empty {
  min-height: 120px;
}

.chains-list {
  display: flex;
  gap: 10px;
  margin: 0 -18px 4px;
  padding: 2px 18px 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(8, 127, 181, 0.28) transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.chains-list::-webkit-scrollbar {
  height: 6px;
}

.chains-list::-webkit-scrollbar-track {
  background: transparent;
}

.chains-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(8, 127, 181, 0.22);
}

.chain-row {
  display: grid;
  flex: 0 0 176px;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px 10px;
  min-height: 112px;
  padding: 12px;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-solid);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 22px rgba(17, 118, 174, 0.07);
  cursor: pointer;
}

.chain-row.active,
.chain-row:focus-visible {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 174, 234, 0.14);
  outline: none;
}

.chain-row img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: contain;
}

.chain-name {
  margin-bottom: 2px;
  font-weight: 900;
  line-height: 1.15;
}

.chain-meta {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.chain-row .count-pill {
  grid-column: 1 / -1;
  justify-self: start;
  max-width: 100%;
  min-width: 0;
  padding: 5px 9px;
  border: 1px solid rgba(8, 127, 181, 0.16);
  background: rgba(234, 248, 255, 0.72);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.nav-button {
  display: grid;
  min-height: 48px;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.nav-button span:first-child {
  font-size: 19px;
}

.nav-button .nav-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-button.active {
  background: var(--soft-blue);
  color: var(--green-dark);
}

.empty-state {
  padding: 24px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .facet-column {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    grid-column: 1;
    grid-row: 1;
    gap: 8px;
    margin: 0 -10px;
    padding: 8px 10px;
    overflow-x: auto;
    background: rgba(247, 251, 255, 0.94);
    backdrop-filter: blur(14px);
    scrollbar-width: none;
  }

  .facet-column::-webkit-scrollbar {
    display: none;
  }

  .facet-panel {
    flex: 0 0 168px;
    max-height: 112px;
    overflow: hidden;
    position: static;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-solid);
    box-shadow: 0 10px 24px rgba(17, 118, 174, 0.08);
  }

  .facet-panel:focus-within {
    max-height: 260px;
    overflow-y: auto;
  }

  .facet-group h3 {
    margin-bottom: 8px;
    font-size: 15px;
  }

  .facet-options {
    gap: 8px;
  }

  .facet-options.expanded {
    max-height: 178px;
    padding-right: 8px;
  }

  .facet-check {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    font-size: 13px;
  }

  .facet-check input {
    width: 17px;
    height: 17px;
  }

  .facet-more {
    font-size: 13px;
    padding-top: 4px;
  }

  .catalog-layout > .product-grid {
    grid-column: 1;
    grid-row: 2;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .product-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 150px;
  }

  .media {
    min-height: 150px;
  }

  .product-image {
    height: 132px;
    padding: 14px 12px;
  }

  .chain-logo {
    right: 8px;
    bottom: 8px;
    width: 34px;
    height: 34px;
  }

  .product-body {
    padding: 11px 10px;
  }

  .product-title {
    margin-bottom: 6px;
    font-size: 14px;
  }

  .discount-badge {
    padding: 3px 5px;
    font-size: 10px;
  }

  .actual-price {
    font-size: 18px;
  }

  .old-price,
  .unit-price {
    font-size: 12px;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .product-view-toggle {
    width: 100%;
  }

  .product-view-toggle button {
    flex: 1 1 0;
    padding: 0 8px;
    font-size: 11px;
  }

  .product-group-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .product-group-body {
    padding: 9px 10px 10px;
  }

  .product-group-offer {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 6px;
  }

  .product-group-offer img {
    width: 24px;
    height: 24px;
  }

  .product-group-price strong {
    font-size: 12px;
  }

  h1 {
    font-size: 21px;
  }

  h2 {
    font-size: 20px;
  }

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

  .facet-panel {
    flex-basis: 154px;
  }

  .product-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .media {
    min-height: 144px;
  }

  .product-image {
    height: 124px;
    padding: 12px 8px;
  }
}
