@media (max-width: 1180px) and (min-width: 981px) {
  .inventory-item {
    grid-template-columns: 72px minmax(150px, 1.5fr) minmax(110px, 0.8fr) 106px 80px;
    gap: 12px;
  }

  .item-photo {
    width: 72px;
    height: 72px;
  }

  .item-detail-secondary {
    display: none;
  }
}

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

  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clear-filter-button {
    width: 100%;
    justify-self: stretch;
  }

  .inventory-item {
    grid-template-columns: 72px minmax(180px, 1.5fr) minmax(120px, 0.8fr) 106px 80px;
  }

  .item-photo {
    width: 72px;
    height: 72px;
  }

  .item-detail-secondary {
    display: none;
  }
}

@media (max-width: 740px) {
  .header-inner,
  .app-main,
  .app-footer {
    width: min(100% - 24px, 620px);
  }

  .header-inner {
    min-height: 62px;
  }

  .brand strong {
    font-size: 13px;
  }

  .brand small,
  .local-badge {
    display: none;
  }

  .app-main {
    padding-block: 24px 38px;
  }

  .page-heading {
    align-items: center;
    margin-bottom: 22px;
  }

  .page-heading h1 {
    font-size: 22px;
  }

  .heading-summary {
    font-size: 12px;
  }

  .add-button {
    width: 46px;
    min-width: 46px;
    height: 46px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    gap: 0;
  }

  .add-button svg {
    position: absolute;
    color: #fff;
  }

  .status-grid {
    gap: 8px;
    margin-bottom: 26px;
  }

  .status-card {
    min-height: 88px;
    grid-template-columns: 34px 1fr;
    gap: 9px;
    padding: 12px;
  }

  .status-icon {
    width: 34px;
    height: 34px;
  }

  .status-icon svg {
    width: 17px;
    height: 17px;
  }

  .status-copy strong {
    font-size: 21px;
  }

  .status-arrow {
    display: none;
  }

  .inventory-header {
    align-items: flex-end;
  }

  .inventory-actions {
    flex: 1;
    justify-content: flex-end;
  }

  .search-field {
    width: min(100%, 280px);
  }

  .mobile-filter-button {
    display: inline-grid;
  }

  .filter-bar {
    display: none;
    grid-template-columns: 1fr;
  }

  .filter-bar.is-open {
    display: grid;
  }

  .clear-filter-button {
    width: 100%;
    justify-self: stretch;
  }

  .inventory-item {
    position: relative;
    min-height: 142px;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    grid-template-areas:
      "photo main actions"
      "photo expiry actions"
      "detail detail detail";
    gap: 8px 12px;
    align-items: start;
    padding: 12px;
  }

  .item-photo {
    grid-area: photo;
    width: 82px;
    height: 82px;
  }

  .item-main {
    grid-area: main;
  }

  .item-detail-primary {
    grid-area: detail;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 9px;
    border-top: 1px solid var(--border);
  }

  .item-detail-secondary {
    display: none;
  }

  .item-expiry {
    grid-area: expiry;
  }

  .item-expiry small,
  .item-expiry strong {
    display: none;
  }

  .item-expiry span {
    margin-top: 0;
  }

  .item-actions {
    grid-area: actions;
    flex-direction: column;
  }

  .app-footer {
    min-height: 92px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
  }

  .dialog {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
  }

  .dialog-body {
    max-height: calc(100vh - 154px);
  }

  .photo-field {
    grid-template-columns: 100px 1fr;
    gap: 12px;
  }

  .photo-preview {
    width: 100px;
    height: 100px;
  }

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

  .field-wide {
    grid-column: auto;
  }

  .inline-heading {
    flex-wrap: wrap;
  }

  .inline-heading .switch {
    margin-left: 41px;
  }
}

@media (max-width: 480px) {
  .page-heading h1 {
    font-size: 20px;
  }

  .inventory-header {
    display: block;
  }

  .inventory-actions {
    margin-top: 11px;
  }

  .search-field {
    width: 100%;
  }

  .photo-field {
    grid-template-columns: 1fr;
  }

  .photo-preview {
    width: 100%;
    height: 160px;
  }

  .dialog-header,
  .dialog-footer,
  .dialog-body {
    padding-inline: 15px;
  }

  .dialog-footer .button {
    flex: 1;
  }

  .import-footer .button {
    flex-basis: 100%;
  }
}
