/* Optional square product tiles for the shopping list – korbklar. */
.view-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: #e9eee8;
  border: 1px solid #dfe8de;
  border-radius: 12px;
  flex-shrink: 0;
}
.view-switch-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 5px 8px;
  background: transparent;
  color: #778a7c;
  border: 0;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 735;
  white-space: nowrap;
}
.view-switch-btn.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 1px 5px #1c493022;
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 8px;
}
.item-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  min-width: 0;
  background: #fff;
  border: 1px solid #e4ebe2;
  border-radius: 17px;
  overflow: hidden;
  box-shadow: 0 3px 9px #193b2205;
  transition: border-color .16s, background-color .16s, transform .16s;
}
.item-tile:active { transform: scale(.975); }
.tile-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 13px 7px 8px;
  min-width: 0;
  color: var(--ink);
  text-align: center;
}
.tile-quantity {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #edf5ed;
  border-radius: 6px;
  color: #4b8361;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 5px;
  line-height: 1;
  letter-spacing: -.02em;
}
.tile-emoji {
  font-size: 29px;
  line-height: 1;
  display: grid;
  place-items: center;
  height: 32px;
  margin-top: 7px;
  filter: saturate(.93);
}
.tile-name {
  font-size: 10.4px;
  font-weight: 740;
  line-height: 1.14;
  letter-spacing: -.015em;
  margin-top: 3px;
  max-width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.tile-price {
  margin-top: auto;
  color: var(--green);
  font-size: 12.5px;
  font-weight: 820;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  white-space: nowrap;
}
.tile-check {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 29px;
  height: 29px;
  border: 0;
  background: transparent;
  color: #bfcfc2;
  display: grid;
  place-items: center;
  border-radius: 50%;
  z-index: 2;
}
.tile-check svg {
  background: #f4f7f2;
  border: 1px solid #d7e3d6;
  width: 21px;
  height: 21px;
  padding: 4px;
  border-radius: 50%;
}
.tile-check.checked svg {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.item-tile.is-checked {
  background: #f0f5f0;
  border-color: #d4e2d5;
}
.item-tile.is-checked .tile-emoji {
  opacity: .55;
  filter: grayscale(.35);
}
.item-tile.is-checked .tile-name {
  text-decoration: line-through;
  color: #9baa9e;
}
.item-tile.is-checked .tile-price { color: #8a9b8c; }
.item-tile:focus-within { outline: 2px solid #87c9ae; outline-offset: 2px; }
@media (max-width: 360px) {
  .view-switch-btn span { display: none; }
  .view-switch-btn { padding: 6px 8px; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-emoji { font-size: 37px; height: 42px; margin-top: 13px; }
  .tile-name { font-size: 12px; }
  .tile-price { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .item-tile { transition: none; }
}
